/**
 * @name: api封装
 * @date: 2020.2.13
 */
import Vue from 'vue'

var domain = '';
var domain2 = ''; 
if(process.env.NODE_ENV === 'development') {
	domain = '://60.173.195.243:9998'; 
	domain2 = '://192.168.1.34:9666';
    // domain = '://192.168.1.4:8080';  
    // domain = 's://demo.uicsoft.com';
	domain = 's://app.etubang.com';  
	domain2 = 's://api.etubang.com'; 
} else {  
    domain = 's://app.etubang.com';
	domain2 = 's://api.etubang.com'; 
} 
  
const base = 'http' + domain + '/etubang/api/'; 
const base2 = 'http' + domain2 + '/sqyx/';
const socket = 'ws' + domain + '/etubang/';  

const api = {
	socketUrl: socket + 'fillHandler',  //webSocket
	recordUrl: base + 'record/',  //加注/蓄注
	exchargeUrl: base + 'excharge/',  //充值
	integralUrl: base + 'integral/',  //积分
	couponUrl: base + 'coupon/',  //优惠券，现金券
	siteUrl: base + 'site/',  //加注机/加注站
	userUrl: base + 'user/',//用户 
	accoupon: base2 + 'coupon/', // 优惠券活动接口
}

Vue.prototype.$api = api; 
